/*
 * Powered By [fdlm]
 * Web Site: http://www.fdlm.cn
 * Since 2014 - 2015
 */

package com.sjyy.accountemployee.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import com.sjyy.accountemployee.model.*;
import com.sjyy.accountemployee.service.*;
import com.sjyy.accountemployee.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @author cty email:caotianye@fdlm.cn
 * @version 1.0
 * @since 1.0
 */


public class AccountEmployee extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "AccountEmployee";
	public static final String ALIAS_EMPLOYEE_ID = "employeeId";
	public static final String ALIAS_ACCOUNT_ID = "accountId";
	public static final String ALIAS_NICKNAME = "nickname";
	public static final String ALIAS_NAME = "name";
	public static final String ALIAS_TEL = "tel";
	public static final String ALIAS_ADDRESS = "address";
	
	//date formats
	
	//columns START
    /** employeeId       db_column: employee_id */	
	
	private java.lang.Integer employeeId;
    /** accountId       db_column: account_id */	
	@NotNull 
	private java.lang.Integer accountId;
    /** nickname       db_column: nickname */	
	@Length(max=32)
	private java.lang.String nickname;
    /** name       db_column: name */	
	@NotBlank @Length(max=32)
	private java.lang.String name;
    /** tel       db_column: tel */	
	@Length(max=11)
	private java.lang.String tel;
    /** address       db_column: address */	
	@NotBlank @Length(max=256)
	private java.lang.String address;
	//columns END

	public AccountEmployee(){
	}

	public AccountEmployee(
		java.lang.Integer employeeId
	){
		this.employeeId = employeeId;
	}

	public void setEmployeeId(java.lang.Integer value) {
		this.employeeId = value;
	}
	
	public java.lang.Integer getEmployeeId() {
		return this.employeeId;
	}
	public void setAccountId(java.lang.Integer value) {
		this.accountId = value;
	}
	
	public java.lang.Integer getAccountId() {
		return this.accountId;
	}
	public void setNickname(java.lang.String value) {
		this.nickname = value;
	}
	
	public java.lang.String getNickname() {
		return this.nickname;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setTel(java.lang.String value) {
		this.tel = value;
	}
	
	public java.lang.String getTel() {
		return this.tel;
	}
	public void setAddress(java.lang.String value) {
		this.address = value;
	}
	
	public java.lang.String getAddress() {
		return this.address;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("EmployeeId",getEmployeeId())
			.append("AccountId",getAccountId())
			.append("Nickname",getNickname())
			.append("Name",getName())
			.append("Tel",getTel())
			.append("Address",getAddress())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getEmployeeId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof AccountEmployee == false) return false;
		if(this == obj) return true;
		AccountEmployee other = (AccountEmployee)obj;
		return new EqualsBuilder()
			.append(getEmployeeId(),other.getEmployeeId())
			.isEquals();
	}
}

